

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso8859_1" />
    
    <title>Train SOM</title>
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <link rel="top" title="SOM Analyst v1 documentation" href="../../index.html" />
    <link rel="up" title="SOM Computation" href="tbSOMcomputation.html" />
    <link rel="next" title="Calculate Best Matching Units" href="uiVisual.html" />
    <link rel="prev" title="Create Initial SOM" href="uiMapInit.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="uiVisual.html" title="Calculate Best Matching Units"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="uiMapInit.html" title="Create Initial SOM"
             accesskey="P">previous</a> |</li>
        <li><a href="../../index.html">SOM Analyst v1 documentation</a> &raquo;</li>
          <li><a href="../arcgis.html" >SOM Analyst</a> &raquo;</li>
          <li><a href="tbSOMcomputation.html" accesskey="U">SOM Computation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
          <div class="body">
            
  <div class="section" id="train-som">
<h1>Train SOM</h1>
<p>Trains a SOM.</p>
<div class="section" id="arcgis-reference">
<h2>ArcGIS Reference</h2>
<div class="figure">
<img alt="../../_images/stage1.png" src="../../_images/stage1.png" />
</div>
<p><strong>Parameters</strong></p>
<dl class="docutils">
<dt>initial SOM</dt>
<dd>The initial SOM to train.</dd>
<dt>training data</dt>
<dd>The data with which to train the SOM.</dd>
<dt>length of training</dt>
<dd>The length of training as measured by the total number of individual data row exposures.</dd>
<dt>initial learning rate</dt>
<dd>The initial learing rate for the SOM.</dd>
<dt>initial neighborhood radius</dt>
<dd>The initial distance over which a neighborhood is defined.</dd>
<dt>trained SOM</dt>
<dd>The ouput trained SOM.</dd>
<dt>distance metric</dt>
<dd>The distance metric to use when training the SOM. The Euclidean distance metric uses SOM_PAK as released from the Helsinki University of Technology. The Cosine distance metric uses SOM_PAK as modified by Fareed Qaddoura.</dd>
<dt>random generator seed</dt>
<dd>The seed for the random number generator, by default the current time is used.</dd>
<dt>fixed points</dt>
<dd>Use fixed point qualifiers in the training.</dd>
<dt>use weights</dt>
<dd>Use weighting qualifiers in the training.</dd>
<dt>read buffer</dt>
<dd>The number of lines to read at a time.</dd>
<dt>alpha type</dt>
<dd>The learning rate function type. Linear (linear) is defined as initial alpha * [1 - (current training step/run length)]. Inverse-time (inverse_t) is defined as initial alpha * [(run length/100)/((run length/100)+current training step)].</dd>
<dt>snapshot file</dt>
<dd>A series of files to contain the intermediate SOMs. If the name contains %d the current step number will used in the file name.</dd>
<dt>shapshot interval</dt>
<dd>The interval at which to take the snapshots.</dd>
</dl>
</div>
<div class="section" id="module-uiVsom">
<span id="code-reference"></span><h2>Code Reference</h2>
<dl class="function">
<dt id="uiVsom.vsom">
<tt class="descclassname">uiVsom.</tt><tt class="descname">vsom</tt><big>(</big><em>cin</em>, <em>din</em>, <em>cout</em>, <em>rlen</em>, <em>alpha</em>, <em>radius</em>, <em>rand='#'</em>, <em>fixed='#'</em>, <em>weights='#'</em>, <em>buffer='#'</em>, <em>alpha_type='#'</em>, <em>snapfile='#'</em>, <em>snapinterval='#'</em>, <em>path='\\bin\\SOM_PAK\\'</em><big>)</big></dt>
<dd><p>Trains a SOM using the specified parameters.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Arguments :</th><td class="field-body"><dl class="first last docutils">
<dt>cin</dt>
<dd><p class="first last">The input codebook file.</p>
</dd>
<dt>din</dt>
<dd><p class="first last">The training data.</p>
</dd>
<dt>cout</dt>
<dd><p class="first last">The output codebook file.</p>
</dd>
<dt>rlen</dt>
<dd><p class="first last">The length of training.</p>
</dd>
<dt>alpha</dt>
<dd><p class="first last">The initial rate of learning.</p>
</dd>
<dt>radius</dt>
<dd><p class="first last">The initial radius of neighborhoods.</p>
</dd>
<dt>rand <em>optional</em></dt>
<dd><p class="first last">A seed for the random number generator.</p>
</dd>
<dt>fixed <em>optional</em></dt>
<dd><p class="first last">Use fixed points.</p>
</dd>
<dt>weights <em>optional</em></dt>
<dd><p class="first last">Use weights for variables.</p>
</dd>
<dt>buffer <em>optional</em></dt>
<dd><p class="first last">The read buffer size in number of lines.</p>
</dd>
<dt>alpha_type</dt>
<dd><p class="first last">The type of alpha decrease either linear (default) or inverse time.</p>
</dd>
<dt>snapfile</dt>
<dd><p class="first last">The snapshot filename.</p>
</dd>
<dt>snapinterval</dt>
<dd><p class="first last">The interval between snapshots.</p>
</dd>
</dl>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
</div>


          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="uiVisual.html" title="Calculate Best Matching Units"
             >next</a> |</li>
        <li class="right" >
          <a href="uiMapInit.html" title="Create Initial SOM"
             >previous</a> |</li>
        <li><a href="../../index.html">SOM Analyst v1 documentation</a> &raquo;</li>
          <li><a href="../arcgis.html" >SOM Analyst</a> &raquo;</li>
          <li><a href="tbSOMcomputation.html" >SOM Computation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, Martin Lacayo.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>